import Vue from 'vue'
import VueRouter from 'vue-router'
import workbench from '../views/WorkBenchView'
import my from '@/views/MyView'
import qixin from '@/views/QixinView'
import find from '@/views/FindView'
import accountManage from '@/views/MyView/AccountManage'
import changePassword from '@/views/MyView/ChangePsd'

Vue.use(VueRouter)

const routes = [
  {
    path: '/workbench',
    name: 'workbench',
    component: workbench,
    meta: {
      showFooter: true
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/LoginView')
  },
  {
    path: '/clockin',
    name: 'clockin',
    component: () => import('@/views/WorkBenchView/ClockIn')
  },
  {
    path: '/record',
    name: 'record',
    component: () => import('@/views/WorkBenchView/RecordExamine')
  },
  {
    path: '/total',
    name: 'total',
    component: () => import('@/views/WorkBenchView/TotalDetail')
  },
  {
    path: '/approval',
    name: 'approval',
    component: () => import('@/views/WorkBenchView/ApprovaFForm')
  },
  {
    path: '/leave',
    name: 'leave',
    component: () => import('@/views/WorkBenchView/LeaveForm')
  },
  {
    path: '/workcard',
    name: 'workcard',
    component: () => import('@/views/WorkBenchView/WorkCard')
  },
  {
    path: '/my',
    name: 'my',
    component: my,
    meta: {
      showFooter: true
    }
  },
  {
    path: '/accountManage',
    name: 'accountManage',
    component: accountManage
  },
  {
    path: '/changePassword',
    name: 'changePassword',
    component: changePassword
  },
  {
    path: '/qixin',
    name: 'qixin',
    component: qixin,
    meta: {
      showFooter: true
    }
  },
  {
    path: '/find',
    name: 'find',
    component: find,
    meta: {
      showFooter: true
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
